﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="blog.aspx.vb" Inherits="Universities.blog" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 165px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <table style="width:100%;">
        <tr>
            <td class="style1">
    <asp:Button ID="btn_Add_NewBlog" runat="server" Text="Add New Article" />
            </td>
            <td>
                <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
                <ItemTemplate>
                <a class="__headerStyle" href="BlogArticlesWithTags.aspx?TagID=<%# Eval("Tag_ID")%>"><%# Eval("Article_Tag_MonthWise")%></a> |
                </ItemTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
                    
                    SelectCommand="SELECT [Article_Tag_MonthWise], [Tag_ID] FROM [ArticleWithTags]">
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    <br />
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
     <a class="__headerStyle" href="BlogDetails.aspx?ID=<%# Eval("ID")%>"><%# Eval("Tittle")%></a>
     <hr />
     <p style="text-align:right">posted By <%# Eval("UserName")%></p>
     <p style="text-align:right">on <%# Eval("PostDate")%></p>
    </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
        
        
        SelectCommand="SELECT [Tittle], [PostDate], [UserName], [ID] FROM [Qry_View_Blog_Articles] ORDER BY [ID] DESC">
    </asp:SqlDataSource>
    <br />
    <div>
        <br />
        <br />
        <br />
    </div>
    <br />
    <br />
</asp:Content>
